3.1.65 \(\int \frac {A+B x^2}{x^3 (a+b x^2)} \, dx\)

Optimal. Leaf size=50 \[ \frac {(A b-a B) \log \left (a+b x^2\right )}{2 a^2}-\frac {\log (x) (A b-a B)}{a^2}-\frac {A}{2 a x^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {446, 77} \begin {gather*} \frac {(A b-a B) \log \left (a+b x^2\right )}{2 a^2}-\frac {\log (x) (A b-a B)}{a^2}-\frac {A}{2 a x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x^2)/(x^3*(a + b*x^2)),x]

[Out]

-A/(2*a*x^2) - ((A*b - a*B)*Log[x])/a^2 + ((A*b - a*B)*Log[a + b*x^2])/(2*a^2)

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int \frac {A+B x^2}{x^3 \left (a+b x^2\right )} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {A+B x}{x^2 (a+b x)} \, dx,x,x^2\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (\frac {A}{a x^2}+\frac {-A b+a B}{a^2 x}-\frac {b (-A b+a B)}{a^2 (a+b x)}\right ) \, dx,x,x^2\right )\\ &=-\frac {A}{2 a x^2}-\frac {(A b-a B) \log (x)}{a^2}+\frac {(A b-a B) \log \left (a+b x^2\right )}{2 a^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 49, normalized size = 0.98 \begin {gather*} \frac {(A b-a B) \log \left (a+b x^2\right )}{2 a^2}+\frac {\log (x) (a B-A b)}{a^2}-\frac {A}{2 a x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x^2)/(x^3*(a + b*x^2)),x]

[Out]

-1/2*A/(a*x^2) + ((-(A*b) + a*B)*Log[x])/a^2 + ((A*b - a*B)*Log[a + b*x^2])/(2*a^2)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x^2}{x^3 \left (a+b x^2\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(A + B*x^2)/(x^3*(a + b*x^2)),x]

[Out]

IntegrateAlgebraic[(A + B*x^2)/(x^3*(a + b*x^2)), x]

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 47, normalized size = 0.94 \begin {gather*} -\frac {{\left (B a - A b\right )} x^{2} \log \left (b x^{2} + a\right ) - 2 \, {\left (B a - A b\right )} x^{2} \log \relax (x) + A a}{2 \, a^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x^3/(b*x^2+a),x, algorithm="fricas")

[Out]

-1/2*((B*a - A*b)*x^2*log(b*x^2 + a) - 2*(B*a - A*b)*x^2*log(x) + A*a)/(a^2*x^2)

________________________________________________________________________________________

giac [A]  time = 0.32, size = 71, normalized size = 1.42 \begin {gather*} \frac {{\left (B a - A b\right )} \log \left (x^{2}\right )}{2 \, a^{2}} - \frac {{\left (B a b - A b^{2}\right )} \log \left ({\left | b x^{2} + a \right |}\right )}{2 \, a^{2} b} - \frac {B a x^{2} - A b x^{2} + A a}{2 \, a^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x^3/(b*x^2+a),x, algorithm="giac")

[Out]

1/2*(B*a - A*b)*log(x^2)/a^2 - 1/2*(B*a*b - A*b^2)*log(abs(b*x^2 + a))/(a^2*b) - 1/2*(B*a*x^2 - A*b*x^2 + A*a)
/(a^2*x^2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 56, normalized size = 1.12 \begin {gather*} -\frac {A b \ln \relax (x )}{a^{2}}+\frac {A b \ln \left (b \,x^{2}+a \right )}{2 a^{2}}+\frac {B \ln \relax (x )}{a}-\frac {B \ln \left (b \,x^{2}+a \right )}{2 a}-\frac {A}{2 a \,x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x^2+A)/x^3/(b*x^2+a),x)

[Out]

1/2/a^2*ln(b*x^2+a)*A*b-1/2/a*ln(b*x^2+a)*B-1/2*A/a/x^2-1/a^2*ln(x)*A*b+1/a*ln(x)*B

________________________________________________________________________________________

maxima [A]  time = 1.04, size = 48, normalized size = 0.96 \begin {gather*} -\frac {{\left (B a - A b\right )} \log \left (b x^{2} + a\right )}{2 \, a^{2}} + \frac {{\left (B a - A b\right )} \log \left (x^{2}\right )}{2 \, a^{2}} - \frac {A}{2 \, a x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x^3/(b*x^2+a),x, algorithm="maxima")

[Out]

-1/2*(B*a - A*b)*log(b*x^2 + a)/a^2 + 1/2*(B*a - A*b)*log(x^2)/a^2 - 1/2*A/(a*x^2)

________________________________________________________________________________________

mupad [B]  time = 0.13, size = 46, normalized size = 0.92 \begin {gather*} \frac {\ln \left (b\,x^2+a\right )\,\left (A\,b-B\,a\right )}{2\,a^2}-\frac {A}{2\,a\,x^2}-\frac {\ln \relax (x)\,\left (A\,b-B\,a\right )}{a^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x^2)/(x^3*(a + b*x^2)),x)

[Out]

(log(a + b*x^2)*(A*b - B*a))/(2*a^2) - A/(2*a*x^2) - (log(x)*(A*b - B*a))/a^2

________________________________________________________________________________________

sympy [A]  time = 0.71, size = 41, normalized size = 0.82 \begin {gather*} - \frac {A}{2 a x^{2}} + \frac {\left (- A b + B a\right ) \log {\relax (x )}}{a^{2}} - \frac {\left (- A b + B a\right ) \log {\left (\frac {a}{b} + x^{2} \right )}}{2 a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x**2+A)/x**3/(b*x**2+a),x)

[Out]

-A/(2*a*x**2) + (-A*b + B*a)*log(x)/a**2 - (-A*b + B*a)*log(a/b + x**2)/(2*a**2)

________________________________________________________________________________________